Move deprectated menu enumerations to a private header
authorMatthias Clasen <mclasen@redhat.com>
Sun, 29 Aug 2010 01:24:11 +0000 (21:24 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 29 Aug 2010 01:24:11 +0000 (21:24 -0400)
The GtkSubmenuDirection and GtkSubmenuPlacement enumerations
have been deprecated as public API for a while, but are still used
internally in the menu code. Move them to a private header. This
also prevents to generation of GObject boilerplate for these enums.

gtk/Makefile.am
gtk/gtkenums.h
gtk/gtkmenu.c
gtk/gtkmenubar.c
gtk/gtkmenuitem.c
gtk/gtkmenuprivate.h [new file with mode: 0644]
gtk/gtkmenushell.c

index 8fdc74757aa23b8620e6638cda2f98eb62f8d0d4..b2a03f39b45655700873f0a1af2981b6345ac9c2 100644 (file)
@@ -372,6 +372,7 @@ gtk_private_h_sources =             \
        gtkiconcache.h          \
        gtkintl.h               \
        gtkkeyhash.h            \
+       gtkmenuprivate.h        \
        gtkmnemonichash.h       \
        gtkmountoperationprivate.h \
        gtkpango.h              \
index f2c931ecaad17e86ae8e435f25e1f28be3b03295..adadce18b9a14e5250d21a3ebabf2db479eda190 100644 (file)
@@ -371,22 +371,6 @@ typedef enum
   GTK_STATE_INSENSITIVE
 } GtkStateType;
 
-#if !defined(GTK_DISABLE_DEPRECATED) || defined (GTK_MENU_INTERNALS)
-/* Directions for submenus */
-typedef enum
-{
-  GTK_DIRECTION_LEFT,
-  GTK_DIRECTION_RIGHT
-} GtkSubmenuDirection;
-
-/* Placement of submenus */
-typedef enum
-{
-  GTK_TOP_BOTTOM,
-  GTK_LEFT_RIGHT
-} GtkSubmenuPlacement;
-#endif /* GTK_DISABLE_DEPRECATED */
-
 /* Style for toolbars */
 typedef enum
 {
index e258f015fdb5b903cd8596c20fa1c92d6d2b4129..17716f2b6237bbb50fa0224df77917f99311c62f 100644 (file)
@@ -24,7 +24,6 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
-#define GTK_MENU_INTERNALS
 #include "config.h"
 #include <string.h>
 #include "gdk/gdkkeysyms.h"
@@ -36,6 +35,7 @@
 #include "gtkmain.h"
 #include "gtkmarshalers.h"
 #include "gtkmenu.h"
+#include "gtkmenuprivate.h"
 #include "gtktearoffmenuitem.h"
 #include "gtkwindow.h"
 #include "gtkhbox.h"
index 91338d4cdd358c536b2ed67d9a2d96f5fd4bb30a..b597c1c54c220982ca9d4d522fc1867b9fcc5dc3 100644 (file)
@@ -24,8 +24,6 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  */
 
-#define GTK_MENU_INTERNALS
-
 #include "config.h"
 #include "gdk/gdkkeysyms.h"
 #include "gtkbindings.h"
@@ -33,6 +31,7 @@
 #include "gtkmarshalers.h"
 #include "gtkmenubar.h"
 #include "gtkmenuitem.h"
+#include "gtkmenuprivate.h"
 #include "gtksettings.h"
 #include "gtkintl.h"
 #include "gtkwindow.h"
index aa631f833764cbe68e123101e560a126a24a060d..02030833e15f77c5cf04c34b8844a0da9de38e6b 100644 (file)
@@ -24,8 +24,6 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
-#define GTK_MENU_INTERNALS
-
 #include "config.h"
 #include <string.h>
 
@@ -34,6 +32,7 @@
 #include "gtkmarshalers.h"
 #include "gtkmenu.h"
 #include "gtkmenubar.h"
+#include "gtkmenuprivate.h"
 #include "gtkseparatormenuitem.h"
 #include "gtkprivate.h"
 #include "gtkbuildable.h"
diff --git a/gtk/gtkmenuprivate.h b/gtk/gtkmenuprivate.h
new file mode 100644 (file)
index 0000000..9c1e0b3
--- /dev/null
@@ -0,0 +1,44 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
+ * file for a list of people on the GTK+ Team.  See the ChangeLog
+ * files for a list of changes.  These files are distributed with
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ */
+
+#ifndef __GTK_MENU_PRIVATE_H__
+#define __GTK_MENU_PRIVATE_H__
+
+/* Directions for submenus */
+typedef enum
+{
+  GTK_DIRECTION_LEFT,
+  GTK_DIRECTION_RIGHT
+} GtkSubmenuDirection;
+
+/* Placement of submenus */
+typedef enum
+{
+  GTK_TOP_BOTTOM,
+  GTK_LEFT_RIGHT
+} GtkSubmenuPlacement;
+
+
+#endif /* __GTK_MENU_PRIVATE_H__ */
index 31f5f996194228327f80a5ab8eeb552d1b6bca1a..763a6dbfbd00be491f47f436221f8e01ef2cbc13 100644 (file)
@@ -24,8 +24,6 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  */
 
-#define GTK_MENU_INTERNALS
-
 #include "config.h"
 #include "gdk/gdkkeysyms.h"
 #include "gtkbindings.h"
@@ -37,6 +35,7 @@
 #include "gtkmenubar.h"
 #include "gtkmenuitem.h"
 #include "gtkmenushell.h"
+#include "gtkmenuprivate.h"
 #include "gtkmnemonichash.h"
 #include "gtktearoffmenuitem.h"
 #include "gtkwindow.h"